﻿
@model DataEntity.SysCompanyConfig
@using DataAccess

<div style="padding: 10px;">
    @using (Html.BeginForm("", "", FormMethod.Post, new { id = "CompanyConfigfm", name = "CompanyConfigfm" }))
    {
        <fieldset>
            <legend>基本信息</legend>
            <table class="TableBlock">
                <tr>
                    <td class="TableLabel">
                        @Html.HiddenFor(m => m.ID)
                      公司名称:
                    </td>
                    <td class="TableData">
                        @Html.TextBoxFor(m => m.CompanyName, new { placeholder = "请输入名称", @class = "easyui-validatebox", required = "true",style="width:450px" })
                    </td>
                    <td class="TableLabel">
                      公司logo:
                    </td>
                    <td class="TableData">
                        @Html.TextBoxFor(m =>m.CompanyLogo)
                    </td>
                </tr>
              <tr>
                    <td class="TableLabel">
                        
                      公司地址:
                    </td>
                    <td class="TableData">
                        @Html.TextBoxFor(m => m.Address)
                    </td>
                    <td class="TableLabel">
                      公司网址:
                    </td>
                    <td class="TableData">
                        @Html.TextBoxFor(m => m.WebSite)
                    </td>
                </tr>
               
                <tr>
                <td  class="TableLabel">
                    描述:
                </td>
                <td class="TableData" colspan="3">
                    
                        @Html.TextAreaFor(model => model.Summary, new { cols = "3", rows = "4", style = "height:70px;width:700px; text-align: left;" })
                       
                </td>
            </tr>
            </table>
        </fieldset>
        <br />
        <br />
      
        <div style="text-align: right; padding-top: 30px; padding-right: 20px;">
            <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="Save()">
                保存</a>
        </div>
    }
</div>
<script>

    function Save() {
        if ($('#CompanyConfigfm').form('validate'))
        {
            $.post("/CompanyConfig/Save", $('#CompanyConfigfm').form().serializeObject(), function (result) {
                if (result.success) {
                    $.messager.alert('提示', '数据已保存!');
                    
                } else {
                    $.messager.alert('提示', result.msg, 'error');
                }
            }, 'json');
        }
    }




</script>


